﻿using AutoMapper;
using Traceability.App.Api.Application.Command.Basic;
using Traceability.App.Api.Application.Command.Detail.Cultivation;
using Traceability.App.Api.Application.Command.Detail.DeepProcessing;
using Traceability.App.Api.Application.Command.Detail.Slaughter;
using Traceability.App.Model;
using Traceability.App.Model.Cultivation;
using Traceability.App.Model.DeepProcessing;
using Traceability.App.Model.Slaughter;

namespace Traceability.App.Api
{
    public class MyMapper:Profile
    {
        public MyMapper() 
        {
            CreateMap<BasicModel, AddBasicCommand>().ReverseMap();
            CreateMap<BasicModel, UpdateBasicCommand>().ReverseMap();
            
            CreateMap<CultivationModel, AddCultivationCommand>().ReverseMap();
            CreateMap<ImmunityModel, UpdateImmunityCommand>().ReverseMap();
            CreateMap<CultivationCommpanyModel, AddCultivationCommpanyCommand>().ReverseMap();
            
            CreateMap<SlaughterModel, AddSlaughterCommand>().ReverseMap();
            CreateMap<SlaughterCommpanyModel, AddSlaughterCommpanyCommand>().ReverseMap();

            CreateMap<DeepProcessingModel, AddDeepProcessingCommand>().ReverseMap();
            CreateMap<DeepProcessingCompanyModel, AddDeepProcessingCompanyCommand>().ReverseMap();

            CreateMap<DeepVendorModel, AddVendorCommand>().ReverseMap();
        }
    }
}
